Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableDiff with list of pojos: camelcase convert of column names to field names #385

Merged
merged 1 commit into from
Oct 8, 2012

Conversation

mbusik
Copy link

@mbusik mbusik commented Sep 1, 2012

Example:

@Given("pattern$")
public void given_method(List<pojo> input) {
...
}

List<pojo> calculated;

@Then("^phrase...:$")
public void then_phrase(DataTable expected) throws Throwable {
     expected.diff(calculated);
} 

Diff fails, if column headers in the expected table are not written exactly the same as the field members of the pojo (even if expected and calculated are equal).

In contrast, in the @given implementation cucumber does convert column headings to field names (camelCase).

It would be more consistent, if the same mapping rules were applied to the conversion DataDable <-> list of pojos

The present pull request contains a column header -> fieldname mapping in the ComplexTypeWriter used in the diff method.

@travisbot
Copy link

This pull request passes (merged 154d458 into 2f3a115).

aslakhellesoy added a commit that referenced this pull request Oct 8, 2012
TableDiff with list of pojos: camelcase convert of column names to field names
@aslakhellesoy aslakhellesoy merged commit 0ec5551 into cucumber:master Oct 8, 2012
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants